#ifndef DIALOG_H
#define DIALOG_H

#include <QtGui/QDialog>

#include <QSystemTrayIcon>
#include <windows.h>
#include <QAction>

class QTimer;
class QSettings;
class WndItems;

typedef struct tagSTYLE_PAIR{
	QString sName;
	DWORD	dwStyle;
}STYLE_PAIR;

typedef QList<STYLE_PAIR> StylePairs;
//////////////////////////////////////////////////////////
namespace Ui
{
	class Dialog;
}

class Dialog : public QDialog
{
    Q_OBJECT
public:
    Dialog(QWidget *parent = 0);
    ~Dialog();
private:
	void loadStyles();
	void updateActions();
	bool winEvent(MSG *message, long *result);
private:
	QSystemTrayIcon * trayIcon;
	QMenu * trayMenu;
	QTimer * timer;
	QAction * quitAction;
	QAction * pSeparator;
	Ui::Dialog *ui;
	QSettings * settings;
	StylePairs allStyles;
	WndItems * m_pItems;
public slots:
	void onTimer();
	void iconActivated(QSystemTrayIcon::ActivationReason reason);
};

#endif // DIALOG_H
